# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this apkbuild by some scripts for automation
# group=kde-frameworks
pkgname=kguiaddons
pkgver=6.1.0
pkgrel=0
pkgdesc="Addons to QtGui"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-only OR LGPL-3.0-only"
depends_dev="
	plasma-wayland-protocols
	qt6-qttools-dev
	qt6-qtwayland-dev
	wayland-dev
	"
makedepends="$depends_dev
	extra-cmake-modules
	doxygen
	graphviz
	samurai
	"
checkdepends="xvfb-run"
subpackages="$pkgname-dev $pkgname-doc $pkgname-bin"
_repo_url="https://invent.kde.org/frameworks/kguiaddons.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kguiaddons-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	xvfb-run ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

bin() {
	amove usr/bin/kde-geo-uri-handler
	amove usr/share/applications
}

sha512sums="
e4413c692099cc946c260917777fd57e0ffac9bb3a251b70653f7557c64889558a3565896b4c79643504549b29a8b87b28b8cd98bf7762cb4c7056c5e563b869  kguiaddons-6.1.0.tar.xz
"
